Skip to content

Update dependency openai-agents to v0.9.0#347

Open
konflux-internal-p02[bot] wants to merge 1 commit intorhoai-3.4from
konflux/mintmaker/rhoai-3.4/openai-agents-0.x
Open

Update dependency openai-agents to v0.9.0#347
konflux-internal-p02[bot] wants to merge 1 commit intorhoai-3.4from
konflux/mintmaker/rhoai-3.4/openai-agents-0.x

Conversation

@konflux-internal-p02
Copy link

@konflux-internal-p02 konflux-internal-p02 bot commented Jan 21, 2026

Note: This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
openai-agents ==0.2.11 -> ==0.9.0 age confidence

Release Notes

openai/openai-agents-python (openai-agents)

v0.9.0

Compare Source

Key Changes

Python 3.9 is no longer supported

Since Python 3.9 is EOLed three months ago, this SDK no longer support the version. Please upgrade to Python 3.10 or newer.

Timeouts for function tools

Now you can pass the following options to customize function tool behavior:

  • timeout_seconds: float | None
  • timeout_behavior: ToolTimeoutBehavior = "error_as_result" # or "raise_exception"
  • timeout_error_function: ToolErrorFunction | None
Agent#as_tool() now returns FunctionTool

Additionally, the type hint for the value returned from the Agent#as_tool() method has been narrowed from Tool to FunctionTool. This change should not usually cause breaking issues, but if your code relies on the broader union type, you may need to make some adjustments on your side.

What's Changed

Documents & Other Changes

New Contributors

Full Changelog: openai/openai-agents-python@v0.8.4...v0.9.0

v0.8.4

Compare Source

Key Changes

Hosted container tool + Skills

This release includes the hosted shell runtime tool along with its native skills support. Developers now can pass a container-based shell runtime with skills this way:

from agents import Agent, ShellTool

agent = Agent(
    name="Shell Agent",
    model="gpt-5.2",
    instructions="Use the available shell tool to answer user requests.",
    tools=[
        ShellTool(
            environment={
                "type": "container_auto",
                "network_policy": {"type": "disabled"},
                "skills": [
                    {
                        "type": "skill_reference",
                        "skill_id": "skill_698bbe879adc81918725cbc69dcae7960bc5613dadaed377",
                        "version": "1",
                    }
                ],
            }
        )
    ],
)

Refer to examples/tools/container_shell_inline_skill.py and examples/tools/container_shell_skill_reference.py for more details.

What's Changed

Documents & Other Changes

Full Changelog: openai/openai-agents-python@v0.8.3...v0.8.4

v0.8.3

Compare Source

What's Changed

Documents & Other Changes

Full Changelog: openai/openai-agents-python@v0.8.2...v0.8.3

v0.8.2

Compare Source

What's Changed

Documents & Other Changes

New Contributors

Full Changelog: openai/openai-agents-python@v0.8.1...v0.8.2

v0.8.1

Compare Source

What's Changed

Documents & Other Changes

New Contributors

Full Changelog: openai/openai-agents-python@v0.8.0...v0.8.1

v0.8.0

Compare Source

Key Changes

Human-in-the-Loop (HITL)

The human-in-the-loop (HITL) flow enables your agents to pause execution until a person approves or rejects sensitive tool calls. Tools declare when they need approval, run results surface pending approvals as interruptions, and RunState lets you serialize and resume runs after decisions are made.

import asyncio
from agents import Agent, Runner, RunState, function_tool

@​function_tool
async def get_weather(city: str) -> str:
    return f"The weather in {city} is sunny"

# This function requires approval
@​function_tool(needs_approval=True)
async def get_temperature(city: str) -> str:
    return f"The temperature in {city} is 20° Celsius"

agent = Agent(
    name="Weather Assistant",
    instructions="You are a helpful weather assistant. Answer questions about weather and temperature using the available tools.",
    tools=[get_weather, get_temperature],
)

async def main():
    result = await Runner.run(agent, "What is the weather and temperature in Oakland?")
    has_interruptions = len(result.interruptions) > 0

    while has_interruptions:
        state = result.to_state()
        # Process each interruption
        for interruption in result.interruptions:
            print("\nTool call details:")
            print(f"  Agent: {interruption.agent.name}")
            print(f"  Tool: {interruption.name}")
            print(f"  Arguments: {interruption.arguments}")
            confirmed = await confirm("\nDo you approve this tool call?")
            if confirmed:
                print(f"✓ Approved: {interruption.name}")
                state.approve(interruption)
            else:
                print(f"✗ Rejected: {interruption.name}")
                state.reject(interruption)

        # Resume execution with the updated state
        print("\nResuming agent execution...")
        result = await Runner.run(agent, state)
        has_interruptions = len(result.interruptions) > 0

    print(result.final_output)

Refer to the document page and examples for more details.

Migration Guide

In this version, two runtime behavior changes may require migration work:

  • Function tools wrapping synchronous Python callables now execute on worker threads via asyncio.to_thread(...) instead of running on the event loop thread. If your tool logic depends on thread-local state or thread-affine resources, migrate to an async tool implementation or make thread affinity explicit in your tool code.
  • Local MCP tool failure handling is now configurable, and the default behavior can return model-visible error output instead of failing the whole run. If you rely on fail-fast semantics, set mcp_config={"failure_error_function": None}. Server-level failure_error_function values override the agent-level setting, so set failure_error_function=None on each local MCP server that has an explicit handler.

What's Changed

Documents & Other Changes

New Contributors

Full Changelog: openai/openai-agents-python@v0.7.0...v0.8.0

v0.7.0

Compare Source

Key Changes

Nested handoff behavior is now opt-in

The nested handoffs behavior were enabled by default in v0.6.0. Now, it is now disabled by default. To enable it again, you need to set the nest_handoff_history option to True.

from agents import Agent, MCPServerManager, RunConfig, Runner

agent = Agent(name="My agent", instructions="Be creative")
result = await Runner.run(
    agent,
    input="Hey, can you tell me something interesting about Japan?",
    run_config=RunConfig(nest_handoff_history=True),
)
MCPServerManager for multiple MCP server instances

Starting with this version, there is a new, convenient way to manage multiple MCP server instances. See #​2350 and examples/mcp/manager_example.

from contextlib import asynccontextmanager
from fastapi import FastAPI
from agents import Agent, Runner
from agents.mcp import MCPServerManager, MCPServerStreamableHttp

@​asynccontextmanager
async def lifespan(app: FastAPI):
    async with MCPServerManager(
        servers=[
            MCPServerStreamableHttp({"url": 'http://localhost:8001/mcp'}),
            MCPServerStreamableHttp({"url": 'http://localhost:8002/mcp'}),
        ],
        connect_in_parallel=True,
    ) as manager:
        app.state.mcp_manager = manager
        yield

app = FastAPI(lifespan=lifespan)

@​app.post("/agent")
async def run_agent(req) -> dict[str, object]:
    agent = Agent(
        name="Test Agent",
        instructions="Use the MCP tools when needed.",
        mcp_servers= app.state.mcp_manager.active_servers,
    )
    result = await Runner.run(starting_agent=agent, input=build_query(req))
    return {"output": result.final_output}
Other key changes
  • The default reasoning.effort for gpt-5.1/5.2 is now set to "none"; if you rely on the previous default "low" set by the default model configuration, please explicitly set it to "low" in your agent's model_settings.
  • When using a sessions store, session_input_callback used to be required to be provided. Now, it is optional and the default behavior is to append the new input to the session history.

What's Changed

Documents & Other Changes

New Contributors

Full Changelog: openai/openai-agents-python@v0.6.9...v0.7.0

v0.6.9

Compare Source

What's Changed

Full Changelog: openai/openai-agents-python@v0.6.8...v0.6.9

v0.6.8

Compare Source

What's Changed

Documents & Others

New Contributors

Full Changelog: openai/openai-agents-python@v0.6.7...v0.6.8

v0.6.7

Compare Source

What's Changed

Experimental: Codex Tool Support

Starting with this version, we have added a new experimental Codex extension (agents.extensions.experimental.codex). This extension allows you to use Codex as a tool within your agents. Since this module is still experimental, its behavior and implementation details may change in future releases.

If you run an agent with codex_tool() on a host where Codex is installed, the agent will use Codex as a tool to answer the question. The tool simply runs the Codex CLI as a subprocess, so all existing Codex configuration, skills, and capabilities are available without any additional setup.

See the example code and #​2320 for more details.

Documents & Others

Full Changelog: openai/openai-agents-python@v0.6.6...v0.6.7

v0.6.6

Compare Source

What's Changed

Documents & Others

New Contributors

Full Changelog: openai/openai-agents-python@v0.6.5...v0.6.6

v0.6.5

Compare Source

What's Changed

Documents

New Contributors

Full Changelog: openai/openai-agents-python@v0.6.4...v0.6.5

v0.6.4

Compare Source

What's Changed

Documents

New Contributors

Full Changelog: openai/openai-agents-python@v0.6.3...v0.6.4

v0.6.3

Compare Source

What's Changed

New Contributors

Full Changelog: openai/openai-agents-python@v0.6.2...v0.6.3

v0.6.2

Compare Source

What's Changed


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

To execute skipped test pipelines write comment /ok-to-test.


Documentation

Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.

@openshift-ci openshift-ci bot requested review from Jooho and Raghul-M January 21, 2026 17:06
@openshift-ci
Copy link

openshift-ci bot commented Jan 21, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: konflux-internal-p02[bot]
Once this PR has been reviewed and has the lgtm label, please assign snomaan6846 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link

openshift-ci bot commented Jan 21, 2026

Hi @konflux-internal-p02[bot]. Thanks for your PR.

I'm waiting for a red-hat-data-services member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@konflux-internal-p02 konflux-internal-p02 bot force-pushed the konflux/mintmaker/rhoai-3.4/openai-agents-0.x branch from 6cc8147 to e350a91 Compare January 23, 2026 01:10
@konflux-internal-p02 konflux-internal-p02 bot changed the title Update dependency openai-agents to v0.6.9 Update dependency openai-agents to v0.7.0 Jan 23, 2026
@konflux-internal-p02 konflux-internal-p02 bot force-pushed the konflux/mintmaker/rhoai-3.4/openai-agents-0.x branch from e350a91 to 5580d80 Compare February 5, 2026 13:10
@konflux-internal-p02 konflux-internal-p02 bot changed the title Update dependency openai-agents to v0.7.0 Update dependency openai-agents to v0.8.0 Feb 5, 2026
@konflux-internal-p02 konflux-internal-p02 bot force-pushed the konflux/mintmaker/rhoai-3.4/openai-agents-0.x branch from 5580d80 to b38eadb Compare February 7, 2026 01:24
@konflux-internal-p02 konflux-internal-p02 bot changed the title Update dependency openai-agents to v0.8.0 Update dependency openai-agents to v0.8.1 Feb 7, 2026
@konflux-internal-p02 konflux-internal-p02 bot force-pushed the konflux/mintmaker/rhoai-3.4/openai-agents-0.x branch from b38eadb to 042870c Compare February 10, 2026 01:12
@konflux-internal-p02 konflux-internal-p02 bot changed the title Update dependency openai-agents to v0.8.1 Update dependency openai-agents to v0.8.3 Feb 10, 2026
@konflux-internal-p02 konflux-internal-p02 bot force-pushed the konflux/mintmaker/rhoai-3.4/openai-agents-0.x branch from 042870c to 19d439e Compare February 12, 2026 01:15
@konflux-internal-p02 konflux-internal-p02 bot changed the title Update dependency openai-agents to v0.8.3 Update dependency openai-agents to v0.8.4 Feb 12, 2026
Signed-off-by: konflux-internal-p02 <170854209+konflux-internal-p02[bot]@users.noreply.github.com>
@konflux-internal-p02 konflux-internal-p02 bot force-pushed the konflux/mintmaker/rhoai-3.4/openai-agents-0.x branch from 19d439e to 7f55fcc Compare February 14, 2026 04:49
@konflux-internal-p02 konflux-internal-p02 bot changed the title Update dependency openai-agents to v0.8.4 Update dependency openai-agents to v0.9.0 Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants